print("模式A")
for i in range(1, 7):
    for j in range(1, i + 1):
        print(j, end=" ")
    print()
print("模式B")
for i in range(6, 0, -1):
    for j in range(1, i + 1):
        print(j, end=" ")
    print()
print("模式C")
for i in range(1, 7):
    for k in range(1, 7 - i):
        print(" ", end=" ")
    for j in range(i, 0, -1):
        print(j, end=" ")
    print()
print("模式D")
for i in range(6, 0, -1):
    for k in range(0, 6 - i):
        print(" ", end=" ")
    for j in range(1, i + 1):
        print(j, end=" ")
    print()
